Skip to content

support for custom chunksizes#11

Open
heavygale wants to merge 1 commit intoBremaweb:masterfrom
heavygale:patch-1
Open

support for custom chunksizes#11
heavygale wants to merge 1 commit intoBremaweb:masterfrom
heavygale:patch-1

Conversation

@heavygale
Copy link
Contributor

landrush.get_chunk(pos) -> Without this fix claimed areas shown by hud.lua are .5 too big or too small (the border was in the middle of the blocks).

landrush.get_chunk_center(pos) -> Fix for landrush:showarea position when using a custom chunksize.

Existing landclaims with chunksize>16 may move by 1 block with this changes.

Thanks to Ducky!

landrush.get_chunk(pos) -> Without this fix claimed areas shown by hud.lua are .5 too big or too small (the border was in the middle of the blocks).

landrush.get_chunk_center(pos) -> Fix for landrush:showarea position when using a custom chunksize.

Existing landclaims with chunksize>16 may move by 1 block with this changes.

Thanks to Ducky!


local z = math.floor(pos.z/landrush.config:get("chunkSize"))
local z = math.floor((pos.x+.5)/landrush.config:get("chunkSize"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in (pos.x+.5)

@SmallJoker
Copy link
Contributor

SmallJoker commented Aug 3, 2016

Existing landclaims with chunksize>16 may move by 1 block with this changes.

When you change it from 16 to 18, it would move the 2nd claim by two nodes, the 3rd by four, the 4th by six and so on. DO NOT CHANGE THIS ON AN EXISTING MAP, NEVER EVER.

@t4im
Copy link
Contributor

t4im commented Aug 20, 2016

You should rename the setting to "landrush.claim_size" when at it to avoid clashing terminology with minetest upstream.

16 is always minetest.MAP_BLOCKSIZE
and chunksize is usually 5 (meaning a chunk is 5 times the blocksize)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants